package q1;

import java.util.Arrays;

public class Solution {
    public int singleNumber(int[] A) {
        int res = A[0];
        for (int i = 1 ; i < A.length ; i++) {
            res = res ^ A[i];
        }
        return res;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        int[] arr = {1, 3, 4, 5,5,2, 3, 1, 4};
        int i = solution.singleNumber(arr);
        System.out.println(i);

        System.out.println(3^5);
    }
}